// 修改用户资料api
let {
    user
} = require("../login/sign_schma.js");
module.exports = {
    // eslint-disable-next-line no-unused-vars
    datumChange: function (req, res, err) {
        console.log(req.body,123);
        let userinfo = req.body;
        let userName = userinfo.userName;
        let tel = userinfo.tel;
        let email = userinfo.email;
        let integral = userinfo.integral - 10;
        let disable = userinfo.disable;
        user.updateOne({user:userinfo.user},{$set:{userName,tel,email,integral,disable}}).then((d0)=>{
            console.log(d0,"111");
            userinfo.integral = userinfo.integral - 10;
            res.send(userinfo)
        })
        
    }
}